﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eassets.Data.Asset;
using Eassets.Layered.Domain.Asset;
using System.Collections.ObjectModel;

namespace Eassets.Service.Asset
{
    public class AssetTransferOutDetailsService
    {
        AssetTransferOutDetailsData assetTransferOutDetailsdata = new AssetTransferOutDetailsData();

        /// <summary>
        /// Inserts assetTransferOutDetails.
        /// </summary>
        /// <param name="assetTransferOutDetails"></param>
        public void AddAssetTransferOutDetails(AssetTransferOutDetails assetTransferOutDetails)
        {
            if (assetTransferOutDetails != null)
            {
                assetTransferOutDetailsdata.AddAssetTransferOutDetails(assetTransferOutDetails);
            }
        }

        /// <summary>
        /// Updates assetTransferOutDetails.
        /// </summary>
        /// <param name="assetTransferOutDetails"></param>
        public void ModifyAssetTransferOutDetails(AssetTransferOutDetails assetTransferOutDetails)
        {
            if (assetTransferOutDetails != null)
            {
                assetTransferOutDetailsdata.ModifyAssetTransferOutDetails(assetTransferOutDetails);
            }
        }

        /// <summary>
        /// Delete assetTransferOutDetails.
        /// </summary>
        /// <param name="assetTransferOutDetailsId"></param>
        public void DeleteAssetTransferOutDetails(long assetTransferOutDetailsId)
        {
            if (assetTransferOutDetailsId != 0)
            {
                assetTransferOutDetailsdata.DeleteAssetTransferOutDetails(assetTransferOutDetailsId);
            }
        }

        /// <summary>
        /// GetbyId assetTransferOutDetails.
        /// </summary>
        /// <param name="assetTransferOutDetailsId"></param>
        /// <returns></returns>
        public AssetTransferOutDetails GetByIdAssetTransferOutDetails(long assetTransferOutDetailsId)
        {
            return assetTransferOutDetailsdata.GetByIdAssetTransferOutDetails(assetTransferOutDetailsId);
        }

        /// <summary>
        ///  GetAll assetTransferOutDetails.
        /// </summary>
        /// <returns></returns>
        public Collection<AssetTransferOutDetails> GetAllAssetTransferOutDetails()
        {
            return assetTransferOutDetailsdata.GetAllAssetTransferOutDetails();
        }

        public long GetNoOfItemsForAnAsset(long assetId)
        {
            return assetTransferOutDetailsdata.GetNoOfItemsForAnAsset(assetId);
        }

        public long GetNoOfAssetsInOrganizationLevelListAssetByAssetId(long assetId)
        {
            return assetTransferOutDetailsdata.GetNoOfAssetsInOrganizationLevelListAssetByAssetId(assetId);
        }
    }
}
